package ym.ecrm.core.domain.financeManagement;


import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import ym.ecrm.core.domain.base.BaseEntity;
import ym.ecrm.core.domain.systemManagement.User;

/**
 * 管理票据类
 * @author fage
 *version 1.0
 */

@Entity
@Table(name = "t_collectionBill")
public class CollectionBill extends BaseEntity{

	/**
	 * billCode 票据记录编号
	 */
	private String billCode;
	/**
	 * accountsReceivable 对应应收账款
	 */
	@ManyToOne(targetEntity=Collection.class
			,cascade = {CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn(name ="accountsReceiVableId")
	private AccountsReceivable accountsReceivable;
	
	/**
	 * billNumber 票据号码
	 */
	private String billNumber;
	/**
	 * sum 票据金额
	 */
	private String sum;
	/**
	 * makeTime 开票日期
	 */
	private String makeTime;
	/**
	 * balanceWay 结算方式
	 */
	private String balanceWay;
	/**
	 * user  经手人
	 */
	@ManyToOne(targetEntity = User.class
			, cascade = {CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "userId")
	private User user;
	
	
	public String getBillCode() {
		return billCode;
	}
	public void setBillCode(String billCode) {
		this.billCode = billCode;
	}


	
	public AccountsReceivable getAccountsReceivable() {
		return accountsReceivable;
	}
	public void setAccountsReceivable(AccountsReceivable accountsReceivable) {
		this.accountsReceivable = accountsReceivable;
	}
	public String getBillNumber() {
		return billNumber;
	}
	public void setBillNumber(String billNumber) {
		this.billNumber = billNumber;
	}
	public String getSum() {
		return sum;
	}
	public void setSum(String sum) {
		this.sum = sum;
	}
	public String getMakeTime() {
		return makeTime;
	}
	public void setMakeTime(String makeTime) {
		this.makeTime = makeTime;
	}
	public String getBalanceWay() {
		return balanceWay;
	}
	public void setBalanceWay(String balanceWay) {
		this.balanceWay = balanceWay;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}

	
	
	
}
